﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CadastroMensagensTest
{
    public static class StringUtil
    {
        public static string RetornaTextoAleatorio(int tamanho)
        {
            string str = string.Empty;
            string caracteres = "abcdefghijklmnopqrstuvwxyz1234567890!@#$%¨&*()_+{}?/;:123456780\"'";
            StringBuilder rs = new StringBuilder();
            Random rnd = new Random();
            for (int i = 0; i < tamanho; i++)
            {
                rs.Append(caracteres[(int)(rnd.NextDouble() * caracteres.Length)]);
            }
            return rs.ToString();
        }
    }
}
